//
//  BookMarkNavigationBar.swift
//  test
//  弃用
//
//  Created by  mahoPunch on 2021/6/11.
//

import SwiftUI

struct BookmarkNavigationBar: View {
    var callback: ViewCallBack?
    
    //通知bookmarkview界面进行新建书签editor的唤起
    @Binding var showNewBookmarkEditor: Bool
    //@Binding var isNewBookmark: Bool
    
    var body: some View {
        
        

            
            

        ZStack {

            Text("书签")
                .font(.title3)
                .frame(alignment: .center)

            HStack{
                Button(action: {
                    callback?.goBack()
                }){//返回
                    Image(systemName: "chevron.backward")
                    Text("返回")
                }

                Spacer()

                Button(action: {
                    showNewBookmarkEditor = true
                    //isNewBookmark = true
                    //modeldata.bookmarks.append(BookmarkModel(id: 8, siteName: string, url: string2))
                }){//准备进行一个空编辑小窗的弹出
                    Image(systemName: "plus")
                }

            }
            .padding(7)

        }
    }
}

struct BookmarkNavigationBar_Previews: PreviewProvider {
    static var previews: some View {
        BookmarkNavigationBar(showNewBookmarkEditor: .constant(true))
    }
}
